/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Tela;

import Bean.CadastroAdvogadoBean;
import Dao.CadastroAdvogadoDao;
import Dao.RelatoriosDAO;
import Utils.Relatorio;
import Utils.UtilInterface;
import com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException;
import java.awt.Color;
import java.sql.SQLException;
import java.util.List;
import javax.swing.JOptionPane;
import javax.swing.table.DefaultTableModel;

/**
 *
 * @author william
 */
public class CadastroAgendaAdvogado extends javax.swing.JFrame {

    private List<CadastroAdvogadoBean> listaAdvogado;
    private int id = 0;
    private boolean salvar = true;
    private String tipo = "nome";

    /**
     * Creates new form CadastroAdvogado
     */
    public CadastroAgendaAdvogado() {
        initComponents();
        setLocationRelativeTo(null);
        botoesInical();
        atualizarTabela();
    }

    public void botoesInical() {
        btnExcluir.setEnabled(false);
        btnNovo.setEnabled(true);
        btnSalvar.setEnabled(false);
        btnAlterar.setEnabled(false);
        limpaCampos();
        bloqueiaCampos(false);
        atualizarTabela();
    }

    public void bloqueiaCampos(boolean opc) {
        txNome.setEnabled(opc);
        txPai.setEnabled(opc);
        txMae.setEnabled(opc);
        txRg.setEnabled(opc);
        txCpf.setEnabled(opc);
        cbSexo.setEnabled(opc);
        txOab.setEnabled(opc);
        txforNascimento.setEnabled(opc);
        txNaturalidade.setEnabled(opc);
        cbEstadoCivil.setEnabled(opc);
        txBairro.setEnabled(opc);
        txCep.setEnabled(opc);
        txTelefone.setEnabled(opc);
        txNumero.setEnabled(opc);
        txCidade.setEnabled(opc);
        txCelular.setEnabled(opc);
        txEmail.setEnabled(opc);
        cbUf.setEnabled(opc);
        txEndereco.setEnabled(opc);
        cbEstado.setEnabled(opc);

    }

    public void limpaCampos() {
        txNome.setText(null);
        txPai.setText(null);
        txMae.setText(null);
        txRg.setText(null);
        txCpf.setText(null);
        cbSexo.setSelectedIndex(0);
        txOab.setText(null);
        txforNascimento.setText(null);
        txNaturalidade.setText(null);
        cbEstadoCivil.setSelectedIndex(0);
        txBairro.setText(null);
        txCep.setText(null);
        txTelefone.setText(null);
        txNumero.setText(null);
        txCelular.setText(null);
        txEmail.setText(null);
        txCidade.setText(null);
        cbUf.setSelectedIndex(0);
        txEndereco.setText(null);
        cbEstado.setSelectedIndex(0);

    }

    private CadastroAdvogadoBean retornaObejeto() {
        CadastroAdvogadoBean advogado = new CadastroAdvogadoBean();
        advogado.setNome(txNome.getText().trim());
        advogado.setPai(txPai.getText().trim());
        advogado.setMae(txMae.getText().trim());
        advogado.setNascimento(txforNascimento.getText().trim());
        advogado.setNaturalidade(txNaturalidade.getText().trim());
        advogado.setRg(txRg.getText().trim());
        advogado.setCpf(txCpf.getText().trim());
        advogado.setSexo(cbSexo.getSelectedItem().toString());
        advogado.setEstadoCivil(cbEstadoCivil.getSelectedItem().toString());
        advogado.setUf(cbUf.getSelectedItem().toString());
        advogado.setOab(txOab.getText().trim());

        advogado.setCidade(txCidade.getText().trim());
        advogado.setEndereco(txEndereco.getText().trim());
        advogado.setNumero(txNumero.getText().trim());
        advogado.setBairro(txBairro.getText().trim());
        advogado.setCep(txCep.getText().trim());
        advogado.setCelular(txCelular.getText().trim());
        advogado.setEmail(txEmail.getText().trim());
        advogado.setTelefone(txTelefone.getText().trim());
        advogado.setEstado(cbEstado.getSelectedItem().toString());

        advogado.setIdavogado(id);
        return advogado;
    }

    private boolean verificaCampos() {

        boolean v = true;

        if (!validaCpf(txCpf.getText())) {
            v = false;
            UtilInterface.msgErro("O CPF CONTINUA INVALIDO");
            txCpf.setBackground(UtilInterface.COR_ERRO);
        }


        if (salvar == true) {
            for (CadastroAdvogadoBean c : listaAdvogado) {
                if (txCpf.getText().equals(c.getCpf())) {
                    v = false;
                    UtilInterface.msgErro("CPF já existe");
                }
            }
        }


        if (txNome.getText().trim().equals("")) {
            v = false;
            txNome.setBackground(UtilInterface.COR_ERRO);
        } else {
            txNome.setBackground(UtilInterface.COR_SUCESSO);
        }

        if (txforNascimento.getText().equals("  /  /    ")) {
            v = false;
            txforNascimento.setBackground(UtilInterface.COR_ERRO);
        } else {
            txforNascimento.setBackground(UtilInterface.COR_SUCESSO);
        }

        if (txNaturalidade.getText().trim().equals("")) {
            v = false;
            txNaturalidade.setBackground(UtilInterface.COR_ERRO);
        } else {
            txNaturalidade.setBackground(UtilInterface.COR_SUCESSO);
        }

        if (txRg.getText().trim().equals("")) {
            v = false;
            txRg.setBackground(UtilInterface.COR_ERRO);
        } else {
            txRg.setBackground(UtilInterface.COR_SUCESSO);
        }


        if (txCpf.getText().equals("   .   .   -  ")) {
            txCpf.setBackground(UtilInterface.COR_ERRO);
        } else {
            txCpf.setBackground(UtilInterface.COR_SUCESSO);

        }

        if (cbSexo.getSelectedIndex() == 0) {
            v = false;
            cbSexo.setBackground(UtilInterface.COR_ERRO);
        } else {
            cbSexo.setBackground(UtilInterface.COR_SUCESSO);
        }

        if (cbEstadoCivil.getSelectedIndex() == 0) {
            v = false;
            cbEstadoCivil.setBackground(UtilInterface.COR_ERRO);
        } else {
            cbEstadoCivil.setBackground(UtilInterface.COR_SUCESSO);
        }
        if (txOab.getText().trim().equals("")) {
            v = false;
            txOab.setBackground(UtilInterface.COR_ERRO);
        } else {
            txOab.setBackground(UtilInterface.COR_SUCESSO);
        }


        if (cbUf.getSelectedIndex() == 0) {
            v = false;
            cbUf.setBackground(UtilInterface.COR_ERRO);
        } else {
            cbUf.setBackground(UtilInterface.COR_SUCESSO);
        }

        if (txEndereco.getText().trim().equals("")) {
            v = false;
            txEndereco.setBackground(UtilInterface.COR_ERRO);
        } else {
            txEndereco.setBackground(UtilInterface.COR_SUCESSO);
        }

        if (txBairro.getText().trim().equals("")) {
            v = false;
            txBairro.setBackground(UtilInterface.COR_ERRO);
        } else {
            txBairro.setBackground(UtilInterface.COR_SUCESSO);
        }

        if (txCidade.getText().trim().equals("")) {
            v = false;
            txCidade.setBackground(UtilInterface.COR_ERRO);
        } else {
            txCidade.setBackground(UtilInterface.COR_SUCESSO);
        }

        if (txCelular.getText().trim().equals("")) {
            v = false;
            txCelular.setBackground(UtilInterface.COR_ERRO);
        } else {
            txCelular.setBackground(UtilInterface.COR_SUCESSO);
        }

        if (txNumero.getText().trim().equals("")) {
            v = false;
            txNumero.setBackground(UtilInterface.COR_ERRO);
        } else {
            txNumero.setBackground(UtilInterface.COR_SUCESSO);
        }

        if (txCep.getText().equals("     -   ")) {
            v = false;
            txCep.setBackground(UtilInterface.COR_ERRO);
        } else {
            txCep.setBackground(UtilInterface.COR_SUCESSO);
        }

        if (cbEstado.getSelectedIndex() == 0) {
            v = false;
            cbEstado.setBackground(UtilInterface.COR_ERRO);
        } else {
            cbEstado.setBackground(UtilInterface.COR_SUCESSO);
        }
        if (txCelular.getText().equals("(  )    -    ")) {
            v = false;
            txCelular.setBackground(UtilInterface.COR_ERRO);
        } else {
            txCelular.setBackground(UtilInterface.COR_SUCESSO);
        }


        if (!v) {
            Utils.UtilInterface.msgErro("PREENCHA OS CAMPOS OBRIGATORIOS!");

        }
        return v;
    }

    public void atualizarTabela() {
        DefaultTableModel modelo = (DefaultTableModel) tblAdvogado.getModel();
        modelo.setNumRows(0);
        try {
            listaAdvogado = CadastroAdvogadoDao.getLista();
            for (CadastroAdvogadoBean c : listaAdvogado) {
                modelo.addRow(new Object[]{c.getNome(), c.getCpf()});
            }
        } catch (SQLException ex) {
            UtilInterface.msgErro("ERRO AO ATUALIZAR TABELA\n" + ex);
        }
    }

    public static boolean validaCpf(String cpf) {
        boolean retorno = true;
        String cpfV = "";
        if (cpf.matches("^\\d{3}\\.\\d{3}\\.\\d{3}-\\d{2}$")) {
            try {
                cpf = cpf.replace(".", "");
                cpf = cpf.replace("-", "");

                for (int i = 0; i <= 9; i++) {
                    cpfV = "";

                    for (int j = 1; j <= 11; j++) {
                        cpfV += i;
                    }
                    if (cpfV.equals(cpf)) {
                        return false;
                    }
                }
                int digito[] = new int[11];
                int dvInformado = Integer.parseInt(cpf.substring(9, 11));
                for (int i = 0; i <= 8; i++) {
                    digito[i] = Integer.parseInt(cpf.substring(i, i + 1));
                }
                int posicao = 10;
                int soma = 0;
                for (int i = 0; i <= 8; i++) {
                    soma = (soma + digito[i] * posicao);
                    posicao = (posicao - 1);
                }
                digito[9] = (soma % 11);
                if (digito[9] < 2) {
                    digito[9] = 0;
                } else {
                    digito[9] = (11 - digito[9]);
                }
                posicao = 11;
                soma = 0;

                for (int i = 0; i <= 9; i++) {
                    soma = (soma + digito[i] * posicao);
                    posicao = (posicao - 1);
                }
                digito[10] = (soma % 11);
                if (digito[10] < 2) {
                    digito[10] = 0;
                } else {
                    digito[10] = (11 - digito[10]);
                }
                int dv = (digito[9] * 10 + digito[10]);
                if (dv != dvInformado) {
                    retorno = false;
                }
            } catch (Exception e) {
                retorno = false;

            }
        } else {
            retorno = false;
        }

        return retorno;
    }

    private void preencheCampos() {
        CadastroAdvogadoBean advogado = listaAdvogado.get(tblAdvogado.getSelectedRow());
        id = advogado.getIdavogado();
        txNome.setText(advogado.getNome());
        txPai.setText(advogado.getPai());
        txMae.setText(advogado.getMae());
        txforNascimento.setText(advogado.getNascimento());
        txNaturalidade.setText(advogado.getNaturalidade());
        cbEstadoCivil.setSelectedItem(advogado.getEstadoCivil());
        cbUf.setSelectedItem(advogado.getUf());
        txRg.setText(advogado.getRg());
        txCpf.setText(advogado.getCpf());
        cbSexo.setSelectedItem(advogado.getSexo());
        txEndereco.setText(advogado.getEndereco());
        txBairro.setText(advogado.getBairro());
        txCidade.setText(advogado.getCidade());
        txCelular.setText(advogado.getCelular());
        txTelefone.setText(advogado.getTelefone());
        txEmail.setText(advogado.getEmail());
        txNumero.setText(advogado.getNumero());
        txCep.setText(advogado.getCep());
        cbEstado.setSelectedItem(advogado.getEstado());
        txOab.setText(advogado.getOab());
        bloqueiaCampos(false);
        btnNovo.setEnabled(true);
        btnSalvar.setEnabled(false);
        btnAlterar.setEnabled(true);
        btnExcluir.setEnabled(true);
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jScrollPane2 = new javax.swing.JScrollPane();
        jTable2 = new javax.swing.JTable();
        buttonGroup1 = new javax.swing.ButtonGroup();
        pCadastro = new javax.swing.JPanel();
        jSeparator1 = new javax.swing.JSeparator();
        lbCadastro1 = new javax.swing.JLabel();
        pBotoes = new javax.swing.JPanel();
        btnNovo = new javax.swing.JButton();
        btnSalvar = new javax.swing.JButton();
        btnAlterar = new javax.swing.JButton();
        btnExcluir = new javax.swing.JButton();
        jSeparator2 = new javax.swing.JSeparator();
        jScrollPane1 = new javax.swing.JScrollPane();
        tblAdvogado = new javax.swing.JTable();
        jLabel2 = new javax.swing.JLabel();
        jRadioButton1 = new javax.swing.JRadioButton();
        jButton1 = new javax.swing.JButton();
        jLabel29 = new javax.swing.JLabel();
        jLabel30 = new javax.swing.JLabel();
        jPanel1 = new javax.swing.JPanel();
        jLabel3 = new javax.swing.JLabel();
        jComboBox1 = new javax.swing.JComboBox();
        jTextField1 = new javax.swing.JTextField();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        txforNascimento = new javax.swing.JFormattedTextField();
        txforNascimento1 = new javax.swing.JFormattedTextField();
        jLabel31 = new javax.swing.JLabel();
        jLabel32 = new javax.swing.JLabel();
        jLabel33 = new javax.swing.JLabel();
        jLabel34 = new javax.swing.JLabel();
        lbData = new javax.swing.JLabel();
        cbprocesso1 = new javax.swing.JComboBox();
        jLabel15 = new javax.swing.JLabel();
        jRadioButton2 = new javax.swing.JRadioButton();
        txforNascimento2 = new javax.swing.JFormattedTextField();
        jLabel7 = new javax.swing.JLabel();
        txforNascimento3 = new javax.swing.JFormattedTextField();
        jComboBox2 = new javax.swing.JComboBox();
        jLabel13 = new javax.swing.JLabel();
        jPanel2 = new javax.swing.JPanel();
        jScrollPane3 = new javax.swing.JScrollPane();
        jTextArea1 = new javax.swing.JTextArea();

        jTable2.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
        jTable2.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null}
            },
            new String [] {
                "NOME", "CPF"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jTable2.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jTable2MouseClicked(evt);
            }
        });
        jTable2.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                jTable2KeyReleased(evt);
            }
        });
        jScrollPane2.setViewportView(jTable2);

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setResizable(false);

        lbCadastro1.setFont(new java.awt.Font("Script MT Bold", 1, 36));
        lbCadastro1.setText("Cadastro de Agenda do Advogado ");
        lbCadastro1.setToolTipText("");

        javax.swing.GroupLayout pCadastroLayout = new javax.swing.GroupLayout(pCadastro);
        pCadastro.setLayout(pCadastroLayout);
        pCadastroLayout.setHorizontalGroup(
            pCadastroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jSeparator1, javax.swing.GroupLayout.DEFAULT_SIZE, 584, Short.MAX_VALUE)
            .addGroup(pCadastroLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lbCadastro1)
                .addContainerGap(14, Short.MAX_VALUE))
        );
        pCadastroLayout.setVerticalGroup(
            pCadastroLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pCadastroLayout.createSequentialGroup()
                .addGap(11, 11, 11)
                .addComponent(lbCadastro1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jSeparator1, javax.swing.GroupLayout.DEFAULT_SIZE, 11, Short.MAX_VALUE))
        );

        pBotoes.setBackground(new java.awt.Color(204, 204, 204));
        pBotoes.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));
        pBotoes.setForeground(new java.awt.Color(51, 51, 255));

        btnNovo.setFont(new java.awt.Font("Tempus Sans ITC", 1, 14));
        btnNovo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/Add.png"))); // NOI18N
        btnNovo.setText("NOVO");
        btnNovo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnNovoActionPerformed(evt);
            }
        });
        pBotoes.add(btnNovo);

        btnSalvar.setFont(new java.awt.Font("Tempus Sans ITC", 1, 14));
        btnSalvar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/Save.png"))); // NOI18N
        btnSalvar.setText("SALVAR");
        btnSalvar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSalvarActionPerformed(evt);
            }
        });
        pBotoes.add(btnSalvar);

        btnAlterar.setFont(new java.awt.Font("Tempus Sans ITC", 1, 14));
        btnAlterar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/Modify.png"))); // NOI18N
        btnAlterar.setText("ALTERAR");
        btnAlterar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAlterarActionPerformed(evt);
            }
        });
        pBotoes.add(btnAlterar);

        btnExcluir.setFont(new java.awt.Font("Tempus Sans ITC", 1, 14));
        btnExcluir.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/Delete.png"))); // NOI18N
        btnExcluir.setText("EXCLUIR");
        btnExcluir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnExcluirActionPerformed(evt);
            }
        });
        pBotoes.add(btnExcluir);

        tblAdvogado.setBorder(new javax.swing.border.MatteBorder(null));
        tblAdvogado.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        tblAdvogado.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null},
                {null, null}
            },
            new String [] {
                "LOCAL", "DATA"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        tblAdvogado.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tblAdvogadoMouseClicked(evt);
            }
        });
        tblAdvogado.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                tblAdvogadoKeyReleased(evt);
            }
        });
        jScrollPane1.setViewportView(tblAdvogado);
        tblAdvogado.getColumnModel().getColumn(0).setMaxWidth(10000);
        tblAdvogado.getColumnModel().getColumn(1).setMaxWidth(1000);

        jLabel2.setFont(new java.awt.Font("Tahoma", 0, 14));
        jLabel2.setText("Pesquisar por");

        buttonGroup1.add(jRadioButton1);
        jRadioButton1.setFont(new java.awt.Font("Tahoma", 0, 14));
        jRadioButton1.setText("NOME");
        jRadioButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton1ActionPerformed(evt);
            }
        });

        jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/View.png"))); // NOI18N
        jButton1.setText("Pesquisar");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        jLabel29.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        jLabel29.setText("Campos Obrigatorios");

        jLabel30.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        jLabel30.setForeground(new java.awt.Color(255, 0, 51));
        jLabel30.setText("*");

        jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        jLabel3.setText("ADVOGADO:");

        jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "CLEBER DE MOURA ALMEIDA" }));

        jLabel4.setText("LOCAL:");

        jLabel5.setText("DATA:");

        jLabel6.setText("HORA:");

        try {
            txforNascimento.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("##:##")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }

        try {
            txforNascimento1.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("##/##/####")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }

        jLabel31.setFont(new java.awt.Font("Tahoma", 1, 14));
        jLabel31.setForeground(new java.awt.Color(255, 0, 51));
        jLabel31.setText("*");

        jLabel32.setFont(new java.awt.Font("Tahoma", 1, 14));
        jLabel32.setForeground(new java.awt.Color(255, 0, 51));
        jLabel32.setText("*");

        jLabel33.setFont(new java.awt.Font("Tahoma", 1, 14));
        jLabel33.setForeground(new java.awt.Color(255, 0, 51));
        jLabel33.setText("*");

        jLabel34.setFont(new java.awt.Font("Tahoma", 1, 14));
        jLabel34.setForeground(new java.awt.Color(255, 0, 51));
        jLabel34.setText("*");

        lbData.setText("SITUAÇÃO");

        cbprocesso1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "AGUARDANDO REALIZAÇÃO", "REALIZADA", "CANCELADA" }));
        cbprocesso1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cbprocesso1ActionPerformed(evt);
            }
        });

        jLabel15.setBackground(new java.awt.Color(255, 51, 51));
        jLabel15.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        jLabel15.setForeground(new java.awt.Color(255, 0, 0));
        jLabel15.setText("*");

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(jLabel33)
                                    .addComponent(jLabel34))
                                .addComponent(jLabel32))
                            .addComponent(jLabel31))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel5)
                            .addComponent(jLabel6)
                            .addComponent(jLabel4)
                            .addComponent(jLabel3))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addComponent(txforNascimento, javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(txforNascimento1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addComponent(jTextField1, javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jComboBox1, javax.swing.GroupLayout.Alignment.LEADING, 0, 174, Short.MAX_VALUE))))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                        .addComponent(jLabel15)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 10, Short.MAX_VALUE)
                        .addComponent(lbData)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(cbprocesso1, javax.swing.GroupLayout.PREFERRED_SIZE, 174, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel3)
                    .addComponent(jLabel31))
                .addGap(7, 7, 7)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel4)
                    .addComponent(jLabel32))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(txforNascimento1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel5)
                        .addComponent(jLabel33)))
                .addGap(10, 10, 10)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txforNascimento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel6)
                    .addComponent(jLabel34))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(cbprocesso1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lbData)
                    .addComponent(jLabel15))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        buttonGroup1.add(jRadioButton2);
        jRadioButton2.setFont(new java.awt.Font("Tahoma", 0, 14));
        jRadioButton2.setSelected(true);
        jRadioButton2.setText("DATA");
        jRadioButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButton2ActionPerformed(evt);
            }
        });

        try {
            txforNascimento2.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("##/##/####")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }

        jLabel7.setText("ATÉ");

        try {
            txforNascimento3.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("##/##/####")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }

        jComboBox2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "CLEBER DE MOURA ALMEIDA" }));

        jLabel13.setFont(new java.awt.Font("Tahoma", 0, 14));
        jLabel13.setText("ADVOGADO:");

        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Descrição"));

        jTextArea1.setColumns(20);
        jTextArea1.setRows(5);
        jScrollPane3.setViewportView(jTextArea1);

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 268, Short.MAX_VALUE)
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 126, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(pCadastro, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(pBotoes, javax.swing.GroupLayout.DEFAULT_SIZE, 564, Short.MAX_VALUE)
                .addContainerGap())
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 557, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap())
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                                .addGap(8, 8, 8)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel2)
                                    .addComponent(jLabel13))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jRadioButton1)
                                    .addComponent(jComboBox2, 0, 177, Short.MAX_VALUE))
                                .addGap(20, 20, 20)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(layout.createSequentialGroup()
                                        .addComponent(txforNascimento2, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(jLabel7)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(txforNascimento3, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(jButton1))
                                    .addComponent(jRadioButton2)))
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(jLabel30)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel29)))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jSeparator2, javax.swing.GroupLayout.DEFAULT_SIZE, 11, Short.MAX_VALUE))))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(pCadastro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(pBotoes, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 13, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(255, 255, 255))
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jRadioButton1)
                            .addComponent(jLabel2)
                            .addComponent(jRadioButton2))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel13)
                            .addComponent(jButton1)
                            .addComponent(txforNascimento3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel7)
                            .addComponent(txforNascimento2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 175, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel29)
                            .addComponent(jLabel30))))
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btnNovoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnNovoActionPerformed
        btnNovo.setEnabled(false);
        btnSalvar.setEnabled(true);
        btnAlterar.setEnabled(false);
        limpaCampos();
        bloqueiaCampos(true);
        txNome.requestFocus();
        salvar = true;
    }//GEN-LAST:event_btnNovoActionPerformed

    private void btnSalvarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSalvarActionPerformed
        if (verificaCampos()) {
            if (salvar) {
                try {
                    CadastroAdvogadoDao.salvar(retornaObejeto());
                    atualizarTabela();
                    UtilInterface.msqSucesso(UtilInterface.MSG_SUC_SALVAR);
                    botoesInical();
                } catch (MySQLIntegrityConstraintViolationException ex) {
                    UtilInterface.msgErro("Ja existe este numero da OAB");
                    txOab.setBackground(Color.RED);
                } catch (SQLException e) {
                    UtilInterface.msgErro("Erro ao Salvar\n" + e);
                }
            } else {
                try {
                    CadastroAdvogadoDao.alterar(retornaObejeto());
                    atualizarTabela();
                    UtilInterface.msqSucesso(UtilInterface.MSG_SUC_ALTERAR);
                    botoesInical();
                } catch (MySQLIntegrityConstraintViolationException ex) {
                    UtilInterface.msgErro("Ja existe este numero da OAB");
                    txOab.setBackground(Color.RED); 
                }catch (SQLException e) {
                    UtilInterface.msgErro("Erro ao Alterar\n" + e);
                }
            }
        }
    }//GEN-LAST:event_btnSalvarActionPerformed

    private void jTable2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTable2MouseClicked
    }//GEN-LAST:event_jTable2MouseClicked

    private void jTable2KeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTable2KeyReleased
    }//GEN-LAST:event_jTable2KeyReleased

    private void tblAdvogadoMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tblAdvogadoMouseClicked
        preencheCampos();
    }//GEN-LAST:event_tblAdvogadoMouseClicked

    private void tblAdvogadoKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_tblAdvogadoKeyReleased
        preencheCampos();
    }//GEN-LAST:event_tblAdvogadoKeyReleased

    private void jRadioButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton1ActionPerformed
        tipo = "nome";
    }//GEN-LAST:event_jRadioButton1ActionPerformed

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        if (!txpesquisa.getText().trim().isEmpty()) {
            atualizarTabelapesquisa();
        }
    }//GEN-LAST:event_jButton1ActionPerformed

    private void btnAlterarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAlterarActionPerformed
        salvar = false;
        bloqueiaCampos(true);
        btnNovo.setEnabled(false);
        btnSalvar.setEnabled(true);
        btnAlterar.setEnabled(false);
        btnExcluir.setEnabled(false);
    }//GEN-LAST:event_btnAlterarActionPerformed

    private void btnExcluirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnExcluirActionPerformed
        if (UtilInterface.msgConfirmacao("Deseja excluir o registro?") == JOptionPane.YES_OPTION) {
            try {
                CadastroAdvogadoDao.excluir(id);
                UtilInterface.msqSucesso("Excluido com sucesso");
                atualizarTabela();
                botoesInical();
            } catch (MySQLIntegrityConstraintViolationException ex) {
                UtilInterface.msgErro("Este Advogado nao pode ser excluido por motivo de ter vinculado ao processo.");
            } catch (Exception e) {
                UtilInterface.msgErro("Erro ao Excluir Registro!\n" + e);
            }
        }
    }//GEN-LAST:event_btnExcluirActionPerformed

    private void jRadioButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton2ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jRadioButton2ActionPerformed

private void cbprocesso1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cbprocesso1ActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_cbprocesso1ActionPerformed

    private void atualizarTabelapesquisa() {
        DefaultTableModel modelo = (DefaultTableModel) tblAdvogado.getModel();
        modelo.setNumRows(0);
        try {
            listaAdvogado = CadastroAdvogadoDao.getLista(tipo, txpesquisa.getText());
            for (CadastroAdvogadoBean c : listaAdvogado) {
                modelo.addRow(new Object[]{c.getNome(), c.getCpf()});
            }
        } catch (SQLException ex) {
            UtilInterface.msgErro("ERRO AO ATUALIZAR TABELA\n" + ex);
        }
    }

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /*
         * Set the Nimbus look and feel
         */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /*
         * If Nimbus (introduced in Java SE 6) is not available, stay with the
         * default look and feel. For details see
         * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(CadastroAgendaAdvogado.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(CadastroAgendaAdvogado.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(CadastroAgendaAdvogado.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(CadastroAgendaAdvogado.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /*
         * Create and display the form
         */
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new CadastroAgendaAdvogado().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnAlterar;
    private javax.swing.JButton btnExcluir;
    private javax.swing.JButton btnNovo;
    private javax.swing.JButton btnSalvar;
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.JComboBox cbprocesso1;
    private javax.swing.JButton jButton1;
    private javax.swing.JComboBox jComboBox1;
    private javax.swing.JComboBox jComboBox2;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel29;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel30;
    private javax.swing.JLabel jLabel31;
    private javax.swing.JLabel jLabel32;
    private javax.swing.JLabel jLabel33;
    private javax.swing.JLabel jLabel34;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JRadioButton jRadioButton1;
    private javax.swing.JRadioButton jRadioButton2;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JSeparator jSeparator2;
    private javax.swing.JTable jTable2;
    private javax.swing.JTextArea jTextArea1;
    private javax.swing.JTextField jTextField1;
    private javax.swing.JLabel lbCadastro1;
    private javax.swing.JLabel lbData;
    private javax.swing.JPanel pBotoes;
    private javax.swing.JPanel pCadastro;
    private javax.swing.JTable tblAdvogado;
    private javax.swing.JFormattedTextField txforNascimento;
    private javax.swing.JFormattedTextField txforNascimento1;
    private javax.swing.JFormattedTextField txforNascimento2;
    private javax.swing.JFormattedTextField txforNascimento3;
    // End of variables declaration//GEN-END:variables
}
